import requests from './request'
import mockRequest from './mockAjax'
export const reqCategoryList=()=>requests({url:'product/getBaseCategoryList',method:'get'})
export const reqBannerList=()=>mockRequest({url:'/banner',method:'get'})
export const reqFloorList=()=>mockRequest({url:'/floor',method:'get'})
export const reqGetSearchInfo=(params)=>requests({url:'/list',method:'post',data:params})
export const reqGoodsInfo=(id)=>requests({url:`/item/${id}`,methos:'get'})
export const reqCart=(a,b)=>requests({url:`/cart/addToCart/${a}/${b}`,method:'post'})
export const reqCartList=()=>requests({url:'/cart/cartList',method:'get'})
export const reqDeleteCart=(skuId)=>requests({url:`/cart/deleteCart/${skuId}`,method:'delete'})
export const reqUpdateChecked=(skuId,isChecked)=>requests({url:`/cart/checkCart/${skuId}/${isChecked}`,method:'get'})
export const reqGetCode=(phone)=>requests({url:`/user/passport/sendCode/${phone}`,method:'get'})
export const reqUserRegister=(phone,password,code)=>requests({url:`/user/passport/register/${phone}/${password}/${code}`,method:'post'})
export const reqUserLogin=(data)=>requests({url:'/user/passport/login',method:'post',data})
export const reqUserInfo=()=>requests({url:'/user/passport/auth/getUserInfo',method:'post',})
export const reqLogout=()=>requests({url:'/user/passport/logout',method:'get',})